\documentclass{ucl_thesis}
% LaTeX source code based on an example by Gabriel Brostow,
% which is based on earlier work of Simon Prince, Macolm Reynolds
% and Mark Herbster.

%twoside for double page printing
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{color}
\usepackage{verbatim}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{setspace}
\newcommand{\theHalgorithm}{\arabic{algorithm}}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{rotating}
\usepackage{subfigure}
% Uncomment this to activate the TikZ library, which is useful for fancy block-diagrams.
    \usepackage{tikz}
    \usetikzlibrary{positioning,arrows,shapes}
\usepackage{pgfplots}
\usepackage{multirow}
%\numberwithin{algorithm}{chapter}
%\usepackage{epsf}
\usepackage{fancyvrb}
% Uncomment this package to enable internal-linking:
\usepackage{hyperref}
\usepackage{url}

\pgfplotsset{width=0.9\textwidth, compat=1.5.1}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
 
\lstset{ %
  language=C++,                % the language of the code
  basicstyle=\footnotesize\ttfamily,           % the size of the fonts that are used for the code
  numbers=left,                   % where to put the line-numbers
  numberstyle=\tiny\color{gray},  % the style that is used for the line-numbers
  stepnumber=2,                   % the step between two line-numbers. If it's 1, each line 
                                  % will be numbered
  numbersep=5pt,                  % how far the line-numbers are from the code
  backgroundcolor=\color{white},      % choose the background color. You must add \usepackage{color}
  showspaces=false,               % show spaces adding particular underscores
  showstringspaces=false,         % underline spaces within strings
  showtabs=false,                 % show tabs within strings adding particular underscores
  frame=single,                   % adds a frame around the code
  rulecolor=\color{black},        % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. commens (green here))
  tabsize=2,                      % sets default tabsize to 2 spaces
  captionpos=b,                   % sets the caption-position to bottom
  breaklines=true,                % sets automatic line breaking
  breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
  title=\lstname,                   % show the filename of files included with \lstinputlisting;
                                  % also try caption instead of title
  keywordstyle=\color{blue},          % keyword style
  commentstyle=\color{dkgreen},       % comment style
  stringstyle=\color{mauve},         % string literal style
  escapeinside={\%*}{*)},            % if you want to add LaTeX within your code
  morekeywords={*,...}               % if you want to add more keywords to the set
}


%%%%%%%%%%%%%%%%% TODO %%%%%%%%%%%%%%%%% 
% - EVERYTHING OH GOD


%%%%%%%%%%%%%%%%% COMMANDS %%%%%%%%%%%%%%%%% 
\newcommand{\vect}[1]{\boldsymbol{#1}}
\newcommand{\figref}[1]{(Fig. \ref{#1})}

\def\etal{{et~al.}}

% I also like these, but didn't have occasion to use them below:
\def\ie{{\it i.e.,\ }}
\def\etc{{\it etc.,\ }}
\def\eg{{\it e.g.,\ }}
\def\vs{{\it vs.\ }}

% New signed quote environment
\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
  \hbox{}\nobreak\hfil(#1)%
  \parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
  {\savebox\mybox{#1}\begin{quote}}
  {\signed{\usebox\mybox}\end{quote}}



%\renewcommand{\baselinestretch}{1.5}
\renewcommand{\bibname}{References}


%%%%%%%%%%%%%%%%% TITLE PAGE %%%%%%%%%%%%%%%%% 

% worktitle
\title{Towards character synthesis using a feature based analysis of writing systems}
    
\author{Moos Hueting}
\def \supervisor {Tim Weyrich}

\date{September 2012}

\begin{document}
\bibliographystyle{abbrv}
\maketitle
\numberwithin{algorithm}{chapter}
\setcounter{page}{1}
\pagenumbering{roman}
\pagestyle{plain}

%%%%%%%%%%%%%%%%% INTRODUCTION PAGES %%%%%%%%%%%%%%%%% 

\newpage
\section*{Abstract}
\input{abstract.tex}


\newpage
\section*{Acknowledgements}
I would like to thank my supervisor Tim Weyrich for sharing his experience and ideas during the
whole process of creating this work.

%\setcounter{tocdepth}{2}
\tableofcontents
\listoffigures
%\listoftables
\listofalgorithms
\newpage

%\clearpage
%
%\begin{center}
%\textbf{To whomever}
%\end{center}

\setcounter{page}{1}
\pagenumbering{arabic}
\pagestyle{plain}



%%%%%%%%%%%%%%%%% CONTENT: INTRODUCTION %%%%%%%%%%%%%%%%% 

\chapter{Introduction}
\label{introduction}
\input{introduction.tex}

%%%%%%%%%%%%%%%%% CONTENT: BACKGROUND %%%%%%%%%%%%%%%%% 
\chapter{Foundations and Related Work}
\label{chp:background}
\input{background.tex}

%%%%%%%%%%%%%%%%% METHODOLOGY %%%%%%%%%%%%%%%%%%%%%

\chapter{Methodology}
\label{chp:method}
\input{method.tex}

%%%%%%%%%%%%%%%%% IMPLEMENTATION %%%%%%%%%%%%%%
\chapter{Implementation}
\label{chp:impl}
\input{implementation.tex}

%%%%%%%%%%%%%%%%% EVALUATION %%%%%%%%%%%%%%%%% 

\chapter{Results}
\label{chp:results}
\input{results.tex}

%%%%%%%%%%%%%%%%% DISCUSSION %%%%%%%%%%%%%%%%%

\chapter{Discussion}
\label{chp:discussion}
%\input{discussion.tex}

%%%%%%%%%%%%%%%%% CONCLUSION %%%%%%%%%%%%%%%%% 

\chapter{Conclusion}
\label{chp:conclusion}
%\input{conclusion.tex}

%%%%%%%%%%%%%%%%% APPENDICES %%%%%%%%%%%%%%%%% 

\addcontentsline{toc}{chapter}{Appendices}

\cleardoublepage
\appendix
\chapter{Glyphs}
\label{chp:glyphs}
\chapter{Code}
\label{chp:code}
\lstinputlisting{../code/simulAnnealing/sa.cpp}
\lstinputlisting{../code/simulAnnealing/features/thin.cpp}
\lstinputlisting{../code/simulAnnealing/features/isocontour.cpp}
\lstinputlisting{../code/simulAnnealing/features/complexity.cpp}
\lstinputlisting{../code/simulAnnealing/features/axismean.cpp}
\lstinputlisting{../code/simulAnnealing/features/convexity.cpp}
\lstinputlisting{../code/simulAnnealing/features/density.cpp}
\lstinputlisting{../code/simulAnnealing/features/ratio.cpp}
\lstinputlisting{../code/simulAnnealing/features/gradOrient.cpp}
\lstinputlisting{../code/simulAnnealing/multinorm/multinorm.cpp}
\lstinputlisting{../code/simulAnnealing/bivgauss/bivgauss.cpp}
\lstinputlisting{../code/simulAnnealing/genCharacters.cpp}
%\chapter{Theoretical Background}
%\label{chp:theory}
%\input{theory.tex}



%%%%%%%%%%%%%%%%% REFERENCES %%%%%%%%%%%%%%%%% 

\addcontentsline{toc}{chapter}{Bibliography}

\bibliography{thesis.bib}
\nocite{*}


\end{document}

